import {ContentView, ContentViewNoFooter} from '@/components/main/contentView'
import {ViewLeft} from '@/components/main/viewLeft'
import {
  MainViewContentTable,
  getTableDatas,
  MainViewNav,
  MainViewModel,
  MainViewLeftNav,
  MainViewLeftFilter,
  MainViewLeftFooter,
} from './components'

export default defineComponent({
  name: 'conf-administrator',
  setup() {
    onMounted(async () => {
      getTableDatas()
    })
    return () => (
      <div class="h-full flex">
        <ViewLeft>
          {{
            nav: () => <MainViewLeftNav></MainViewLeftNav>,
            content: () => <MainViewLeftFilter></MainViewLeftFilter>,
            footer: () => <MainViewLeftFooter></MainViewLeftFooter>,
          }}
        </ViewLeft>
        <ContentViewNoFooter>
          {{
            nav: () => <MainViewNav></MainViewNav>,
            content: () => <MainViewContentTable></MainViewContentTable>,
          }}
        </ContentViewNoFooter>
        <MainViewModel></MainViewModel>
      </div>
    )
  },
})
